
/**
 * @file PartialAR.hpp
 * Class to compute the PPP Solution.
 *
 * @author shjzhang, 2019/07/22
 * all rights reserved by shjzhang
 */

#ifndef GPSTK_PartialAR_HPP
#define GPSTK_PartialAR_HPP

#include "DataStructures.hpp"
#include "Variable.hpp"
#include "Kruskal.hpp"
#include "ARRound.hpp"
#include "ARMLambda.hpp"
#include "Equation.hpp"
#include "Stats.hpp"


namespace gpstk
{

   class PartialAR 
   {
   public:

          /** Common constructor.
           *
           * @param useNEU   If true, will compute dLat, dLon, dH coordinates;
           *                 if false (the default), will compute dx, dy, dz.
           */
       PartialAR()
       {};

       // fix ambiguities using lambda
       virtual void Round( VariableEstDataMap& ambEstData,
                           VariableDataMap& fixedAmbData)
          noexcept(false);

       // fix ambiguities using lambda
       virtual void Round(VariableDataMap& ambData, 
                          VariableDataMap& ambVarData,
                          VariableDataMap& fixedAmbData)
          noexcept(false);

       // fix ambiguities using lambda
       virtual void Round(VariableDataMap& ambData, 
                          CovarianceDataMap& ambCovData,
                          VariableDataMap& fixedAmbData)
          noexcept(false);

       virtual double PAR(VariableDataMap& ambData, 
                          CovarianceDataMap& ambCovData,
                          VariableDataMap& fixedAmbData)
          noexcept(false);

       double Lambda(VariableDataMap& ambData, 
                     CovarianceDataMap& ambCovData,
                     VariableDataMap& fixedAmbData);

          /// Returns a string identifying this object.
       virtual std::string getClassName(void) const;


       virtual void init();


          /// Destructor.
       virtual ~PartialAR() {};

   private:

       // Ambiguity method
       ARRound    ambRound;
       ARMLambda  ambMLambda;

   }; // End of class 'PartialAR'

      //@}

}  // End of namespace gpstk

#endif   // GPSTK_PartialAR_HPP
